﻿<%@ page import="java.util.*" %>
<%
String Code = (String)session.getAttribute("LanguageCode");
String SubCode = (String)session.getAttribute("LanguageSubcode");
Locale locale = new Locale(Code, SubCode);
ResourceBundle resource = ResourceBundle.getBundle("resource", locale);
%>
<script>
$.getScriptIfNotExist("/js/components/Payment/Paymenttype.js");
$.getScriptIfNotExist("/js/components/Payment/suggest.js");
</script>
<script src="/js/components/Payment/RoutePayment.js"></script>
<link href="/css/components/EditReservrd/editreserved.css" rel="stylesheet" />
<link href="/css/components/Payment/Payment.css" rel="stylesheet" />
<div id="payment-dialog" style="display:none;">
<div style="width:100%">
<table name="edit_headform" style="width:100%;">
	<tr>
	<td class="head_edit divAsCell">
		<div style="width: 130px; margin-left:10px;">
			&nbsp;<span name="guestname">-</span>(G)
		</div>
		<div style="width:120px;" >
			&nbsp;<span name="agent">-</span>
		</div>
		<div style="width: 250px;" >
			<span displaytype="group"><% out.print(resource.getString("Payment.info.groupId")); %># G<span name="groupcode">-</span> / </span>
			<% out.print(resource.getString("Payment.info.resId")); %> #<span name="resId">-</span>
		</div>
		<div style="width: 150px; ">
			<span name="resstatus">-</span>
		</div>
	</td>
	
	</tr>
</table>
<div id="payment-booking-details" style="width:50%; float:left;">

<table width="100%" style="background-color:#EBEBF1; border-top:#CACACA solid 1px; border-left:#CACACA solid 1px; border-bottom:#CACACA solid 1px; border-right:#CACACA solid 1px; padding-left:10px; padding-right:10px; text-align: left;">
<tr>
<td colspan="4" width="100%" style="border-bottom:solid #CACACA 1px;" height="24px" >
<span name="bookingdetails">
<strong><% out.print(resource.getString("Payment.bookingdetails.bookingdetails")); %>
</strong></span><span id="payment_groupId">&nbsp;</span>
</td>
</tr> 
<tr>
<td width="20%">
<span id="payment_bookingdetail_agency"><strong><% out.print(resource.getString("Payment.bookingdetails.agency")); %> : </strong></span>
</td>
<td width="80%">
<strong><span style="color:#103083;" id="Payment_bookingdetails_company">-</span>
</strong>
</td>
</tr>
<tr>
<td >
<span><strong><% out.print(resource.getString("Payment.bookingdetails.groupowner")); %> : </strong></span>
</td>
<td >
<span style="color:#103083;" id="Payment_bookingdetails_groupowner"><strong>-</strong>&nbsp;&nbsp;</span><span style="color:#A8A8A8"><% out.print(resource.getString("Payment.bookingdetails.guestId")); %> :</span>
<span id="Payment_bookingdetails_guestId" style="color:#A8A8A8">-</span>
<span style="color:#A8A8A8">/<% out.print(resource.getString("Payment.bookingdetails.Identificationnumber")); %> :</span>
<span id="Payment_bookingdetails_Identificationnumber" style="color:#A8A8A8">-</span>
</td>
</tr>

<tr>
<td>
<span><strong><% out.print(resource.getString("Payment.bookingdetails.address")); %> : </strong></span>
</td>
<td>
<span id="Payment_bookingdetails_address">-</span>
</td>
</tr>

<tr >
<td style="border-bottom:#666 dotted 1px;">
<span><strong><% out.print(resource.getString("Payment.bookingdetails.tel")); %> : </strong></span>
</td>
<td style="border-bottom:#666 dotted 1px;">
<span  id="Payment_bookingdetails_tel">-</span>
</td>
</tr>
<tr>
<td colspan="4">
<table width="100%">
<tr>
<td width="15%" style="text-align: justify"><strong><% out.print(resource.getString("Payment.bookingdetails.built"));%></strong></td>
<td width="40%"><strong><% out.print(resource.getString("Payment.bookingdetails.checkIndetail"));%></strong></td>
<td width="30%"><strong><% out.print(resource.getString("Payment.bookingdetails.amountroomandguest"));%></strong></td>
<td width="15%">
<strong><% out.print(resource.getString("Payment.bookingdetails.balance"));%></strong></td>
</tr>

<tr>
<td valign="top" style="text-align: justify"><span id="Payment_bookingdetails_built" style="text-align: center"></span></td>
<td valign="top">
<div><span id="Payment_bookingdetails_checkIndetail_roomtype">-</span></div>
<div><span id="Payment_bookingdetails_checkIndetail_date">-</span></div>
<div><span id="Payment_bookingdetails_checkIndetail_rate" style="color:#A8A8A8;">-</span></div>
</td>
<td valign="top"><span><% out.print(resource.getString("Payment.bookingdetails.room"));%> </span><span id="Payment_bookingdetails_amountroomandguest_roomamount">-</span>
<span><% out.print(resource.getString("Payment.bookingdetails.adult"));%> </span><span id="Payment_bookingdetails_amountroomandguest_adult">-</span>
<span>,<% out.print(resource.getString("Payment.bookingdetails.children"));%> </span><span id="Payment_bookingdetails_amountroomandguest_children">-</span>
</td>
<td valign="top"><span>฿ </span><span id="Payment_bookingdetails_balance">-</span></td>
</tr>
</table>
</td>
</tr>
</table>
</div>

<!--Folio -->

<div id="payment-folio-list" style="width:50%; float:left;">
<table width="100%" style="background-color:#EBEBF1; border-top:#CACACA solid 1px; border-left:#CACACA solid 1px; border-bottom:#CACACA solid 1px; border-right:#CACACA solid 1px; text-align: left;">
<tr>
<td width="50%" height="24px" style="padding-left:25px;"><strong><% out.print(resource.getString("Payment.folio.folio"));%></strong>
</td>
<td width="50%" colspan="2">&nbsp;
</td>
</tr>
<tr style="background-color:#999; width:100;" >
<td colspan="3" >

<table width="100%" style="color:#FFF;" >
<tr id ="payment-folio-title">
<td>&nbsp;</td>
</tr>
</table>

</td>
</tr>

<tr id="lender-folio-list">
<td style="display:none;">&nbsp;

</td>
</tr>

<tr id="payment-folio-list-footer" style="display:none;">
<td width="50%">
<span><input type="button" id="payment-folio-btn-deletefolio" value="<% out.print(resource.getString("Payment.folio.btn.delfolio"));%>" onclick="DeleteFolio()"></span>
<span><input type="button" id="payment-folio-btn-email" value="<% out.print(resource.getString("Payment.folio.btn.email"));%>"></span>
<span style="padding-left:100px;"><% out.print(resource.getString("Payment.folio.total"));%></span>
</td>
<td width="22%"> 
<div style="float:right;"><span id="payment-folio-moneyunit">(฿)</span>&nbsp;<span id="payment-folio-btn-total-amount" style="padding-right:9px;">2,000.00 </span></div>
</td>
<td width="22%">
<span id="payment-folio-total-paid" style="padding-left:10px">-</span>
</td>
</tr>
<tr id="payment-no-folio-list">
<td width="100%" align="center">
<div style="color:#999;">
<% out.print(resource.getString("Payment.foliolist.titleone"));%><a href="javascript:void(0);" onclick="GenarateFolio()" style="padding-right:10px;"><% out.print(resource.getString("Payment.foliolist.titletwo"));%></a>
<div style="font-style:italic;"><% out.print(resource.getString("Payment.foliolist.titlethree"));%></div>
</div>
</td>
</tr>
</table>
<div style="float:right;"><a href="javascript void=0;" ><% out.print(resource.getString("Payment.folio.payterm"));%></a></div>
</div>
</div>
<!--Account Statement-->
<div id="payment-account-statement">
<table width="100%">
<tr>
<td align="center">
<strong><% out.print(resource.getString("Payment.accountstatement.accountstatement"));%></strong>
</td>
</tr>
</table>
<table width="100%" style="padding-left:10px; padding-right:10px;" id="accList">
<tr>
<td width="7%" class="createline" ><input type="checkbox" id="payment-account-master" onclick="checkAll()">&nbsp;&nbsp;&nbsp;
<% out.print(resource.getString("Payment.accountstatement.date"));%>
</td>
<td align="center" width="38%" class="createline">
<% out.print(resource.getString("Payment.accountstatement.desrefer"));%>
</td>
<td align="center"  width="5%" class="createline">
<% out.print(resource.getString("Payment.accountstatement.folio"));%>
</td>
<td align="center" width="10%" class="createline">
<% out.print(resource.getString("Payment.accountstatement.discallw"));%>
<td align="center" width="10%" class="createline">
<% out.print(resource.getString("Payment.accountstatement.cost"));%>
</td>
<td align="center" width="8%" class="createline">
<% out.print(resource.getString("Payment.accountstatement.tax"));%>
</td>
<td align="center" width="10%" class="createline">
<% out.print(resource.getString("Payment.accountstatement.currency"));%>
</td>
<td align="center"  width="12%" class="createline">
<% out.print(resource.getString("Payment.accountstatement.payment"));%>
</td>
</tr>
</tr>
<tr id="paymentListGroup">
</tr>
<tr id="paymentResInGroup">
</tr>
<tr style="background-color:#DDD">
<td colspan="4">
<span id="payment-account-date" style="padding-left:200px"> <% out.print(resource.getString("Payment.accountstatement.total"));%>
</span>
</td>
<td>
<span id="payment-account-cost" style="float:right;">&nbsp;</span>
</td>
<td>
<span id="payment-account-tax" style="float:right;">&nbsp;</span>
</td>
<td>
<span id="payment-account-currency" style="float:right;">&nbsp;</span>
</td>
<td>
<span id="payment-account-payment" style="float:right;"></span><span id="paymentGroup"></span><span id="paymentS"></span>
</td>
</tr>
</table>

</div>


<div name="payment_footer">
	<table width="100%">
		<tr>
		<!-- FOOTER TOP LEFT START-->
		<td valign="top" align="left">
			<div style="border:0px solid;" name="payment_footer_top_left">
				<div name="payment_footer_btn">
					<button  name="btn_addtasks_note" style="background-color:#6464F7; width:100px;"  onclick="ExceptTex()"><span style="color:#FFF;"><% out.print(resource.getString("Payment.footer.footer_left.tax-exempt")); %></span></button>
					<button  name="btn_route_charges" style="background-color:#6464F7; width:150px;" onclick="ShowRouteChargedialog()"><span style="color:#FFF;"><% out.print(resource.getString("Payment.footer.footer_left.routeCharges")); %></span></button>
					<button  name="btn_addtasks_note" style="background-color:#6464F7; width:100px;" onclick="CreateRefundDialog()"><span style="color:#FFF;"><% out.print(resource.getString("Payment.footer.footer_left.refund")); %></span></button>
					<button  name="btn_route_payment" style="background-color:#6464F7; width:150px;" onclick="ShowRoutedialog()"><span style="color:#FFF;"><% out.print(resource.getString("Payment.footer.footer_left.routePayment")); %></span></button>
					<button  name="btn_route_new_folio" style="background-color:#6464F7; width:150px;" onclick="ShowRoutenewFoliodialog()"><span style="color:#FFF;"><% out.print(resource.getString("Payment.footer.footer_bottom.routenewfolio")); %></span></button>
					
					<table style="margin-top:20px; border:1px dashed; border-color:#804DE6; background-color:#F1F1F1;" width="80%">
						<tr>
							<td>
								<button  name="btn_create_folio" style="background-color:#F3F3F3; width:100px;" ><span style="color:#000;" onclick="GenarateFolio()" ><% out.print(resource.getString("Payment.footer.footer_left.createFolio")); %></span></button>
								<button  name="btn_create_charges" style="background-color:#F3F3F3; width:150px;" onclick="CreateChargesdiaLog(id)" id="btn_create_charges"><span style="color:#000;"><% out.print(resource.getString("Payment.footer.footer_left.paymentCharge")); %></span></button>
								<button  name="btn_create_custom_charges" style="background-color:#F3F3F3; width:160px;" onclick="CreateChargesdiaLog(id)" id="btn_create_custom_charges"><span style="color:#000;" ><% out.print(resource.getString("Payment.footer.footer_left.paymentChargeCustom")); %></span></button>
							</td>
						</tr>
					</table>
				</div>
<div id="innerfoliogroup_payment_footer_btn" style="display:none;">	
				<table style="margin-top:20px; border:1px dashed; border-color:#804DE6; background-color:#F1F1F1;" width="80%">
						<tr>
							<td width="60%">
								<button name="btn_back_to_accounts" style="background-color:#F3F3F3; width:200px;" onclick="BacktoAccountStatement()">
								<span style="color:#000;"><%out.print(resource.getString("Payment.btn.backAcc"));%></span></button>
								<button name="btn_back_to_accounts_group" style="background-color:#F3F3F3; width:200px; display:none;" onclick="BacktoAccountStatementGroup()">
								<span style="color:#000;"><%out.print(resource.getString("Payment.btn.backAcc"));%></span></button>
								</td>
								<td width="40%">
								<button  name="btn_summary_folio" style="background-color:#F3F3F3; width:150px;" onclick="OpenFolioSummaryPage()" id="btn_create_charges"><span style="color:#000;"> <% out.print(resource.getString("Payment.btn.summaryFolio")); %> </span></button>
							</td>
						</tr>
					</table>
					</div>
<div id="back_to_folio_btn" style="display:none;">
						<table style="margin-top:20px; border:1px dashed; border-color:#804DE6; background-color:#F1F1F1;" width="80%">
						<tr>
							<td width="60%">
								<button name="btn_back_to_folio" style="background-color:#F3F3F3; width:200px;" onclick="BacktoFolioPage()"><span style="color:#000;"><% out.print(resource.getString("Payment.btn.backFolio"));%></span></button>
							</td>
							<td width="40%">&nbsp;</td>
						</tr>
					</table>
					</div>
			</div>
		</td>
		<!-- FOOTER TOP LEFT END-->
		<!-- FOOTER TOP RIGHT START-->
		<td>
		<div style="border:0px solid;" name="payment_footer_top_right">
				<table style="border-bottom:1px dashed;margin-left:30%;" width="70%">
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><%out.print(resource.getString("Payment.footer.footer_right.totalReservation"));%></B>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="roomCharge">0</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<%out.print(resource.getString("Payment.footer.footer_right.chargesOther"));%>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						฿ <span id="otherCharge">1,950.00</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<%out.print(resource.getString("Payment.footer.footer_right.totalTax"));%>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="taxCharge">0</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<%out.print(resource.getString("Payment.footer.footer_right.totalDiscAllw"));%>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="disCount">0</span>
						</td>
					</tr>
				</table>
				<table style="border-bottom:1px dashed;margin-left:30%;" width="70%">
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><% out.print(resource.getString("Payment.footer.footer_right.totalSumTax")); %></B>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="totalTaxCharge">0</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><% out.print(resource.getString("Payment.footer.footer_right.totalPayment")); %></B>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="totalPay">0</span>
						</td>
					</tr>
				</table>
				<table style="border-bottom:1px dashed;margin-left:30%;" width="70%">
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><% out.print(resource.getString("Payment.footer.footer_right.totalBalance")); %></B>
						</td>
						<td style="text-align:right;" >
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="totalBalance">0</span>
						</td>
					</tr>
				</table>
			</div>
		</td>
		<!-- FOOTER TOP RIGHT END-->
		</tr>
	</table>

	<table width="100%">
		<tr>
		<!-- FOOTER CENTER START -->
			<td>
			<div style="border:1px solid; background-color:#F1F1F1" name="payment_footer_center">
				<center>
					<table style="border-bottom:1px solid; border-color:#804DE6;" width="97%">
						<tr>
							<td width="10%">
								<B><% out.print(resource.getString("Payment.footer.footer_center.payment"));%></B> 
							</td>
							<td style="color:red;">
								Payment Gateway is not integrated. Credit card will not be charged.
							</td>
						</tr>
					</table>
				</center>

				<center>
					<table width="95%">
						<tr>
							<td width="15%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.mode"));%></B>
							</td>
							<td width="15%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.type"));%></B>
							</td>
							<td width="10%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.amount"));%></B>
							</td>
							<td width="20%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.code"));%></B>
							</td>
							<td width="10%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.number"));%></B>
							</td>
							<td width="30%" colspan=2>
								<B><%out.print(resource.getString("Payment.footer.footer_center.description"));%></B>
							</td>
						</tr>
						<tr>
							<td width="15%">
								<select name="paymode" onchange="fillPayPaymentType()"></select>
							</td>
							<td width="15%">
							<select name="paytype">
							</select>
							</td>
							<td width="10%">
								<input id="payamountG" name="payamount" type="text" value="฿ 00.00" onchange="chkNum(this)" style="text-align:right;">
							</td>
							<td width="20%">
								<input id="payCcNoG" name="payCcNo" type="text" size="30" onkeyup='suggestOnPage(this,this.value);' onblur='checkValue();' />
                                <select id="payCcNoG" name="payCcNo" style="display:none;" onchange="checkToAddCreditCard()"></select>
                                <div name="showdialogAddcreditCard"></div>
							</td>
							<td width="10%">
								<input id="payCcNo2G" name="payCcNo2" type="text" value="" style="text-align:right;">
							</td>
							<td width="15%">
								<input id="payDesG" name="payDes" type="text" size="30">
							</td>
							<td width="15%">
							<button id="btnAddPaymentG" name="btnAddPayment" style="background-color:#6464F7; width:80px;" onclick="addPayment(id)"><span style="color:#FFF;"><%out.print(resource.getString("Payment.footer.footer_center.pay"));%></span></button>
							</td>
						</tr>
					</table>
				</center>
			</div>
			</td>
		<!-- FOOTER CENTER END -->
		</tr>
	</table>
	<table style="background-color:#BEBEBE;" width="100%">
		<tr>
			<td style="text-align:center;">
	<jsp:include page="paymentButton.jsp" flush="true"/>
				</td>
		</tr>
	</table>
	
</div>
</div>

<!------------------------------single payment--------------------------------------------->

<div id="single-payment-dialog" style="display:none;">
<div style="width:100%">
<div id="single-payment-ingroup-info">
<table name="edit_headform" style="width:100%;">
	<tr  >
	<td class="head_edit divAsCell">
		<div style="width: 130px; margin-left:10px;">
			&nbsp;<span name="guestname">-</span>
		</div>
		<div style="width:120px;">
			&nbsp;<span name="agent">-</span>
		</div>
		<div style="width: 250px;">
			<span displaytype="group"><%out.print(resource.getString("Payment.info.groupId"));%># G<span name="groupcode">-</span> / </span>
			<%out.print(resource.getString("Payment.info.resId"));%> #<span name="resId">-</span>
		</div>
		<div style="width: 150px;">
			<span name="resstatus">-</span>
		</div>
		
		<div style="width:200px;">
			<%out.print(resource.getString("Payment.info.roomtype"));%> : <span name="roomtype">-</span>
		</div>
		
		<div style="width: 170px;"><%out.print(resource.getString("Payment.info.room"));%> : <span name="roomName">-</span>
		</div>
	</td>
	</tr>
</table>
</div>

<div id="single-payment-info">
<table name="edit_headform" style="width:100%;">
<tr>
<td class="head_edit">
<div id="single-payment-name" class="headtext" style="padding-right: 100px; padding-left:10px;">
&nbsp;<span id="single-payment-info-name">&nbsp;</span>
</div>
<div id="single-payment-agency" class="headtext" style="margin-left:90px;padding-right: 60px;">
<span id="single-payment-info-agent">&nbsp;</span>
</div>
<div id ="single-payment-info-group_res_code" class="headtext" style="margin-left: 85px;padding-right: 90px;">
<%out.print(resource.getString("Payment.info.resId"));%> # </span><span id ="single-payment-info-res_code">0</span>
</div>
<div id="checkstatus" class="headtext" style="margin-left:-5px; padding-right: 30px;"><span id="single-payment-info-resstatus">&nbsp;</span>
</div>
<div id="checkstatus" class="headtext" style="margin-left:-5px; padding-right: 10px;"><span><%out.print(resource.getString("Payment.info.roomtype"));%>:</span>
<span id="single-payment-info-roomtype" style="
	padding-right: 80px;">&nbsp;</span>
</div>

<div id="checkstatus" class="headtext" style="margin-left:-5px; padding-right: 10px;"><span><%out.print(resource.getString("Payment.info.room"));%> : </span><span id="single-payment-info-room" style="
	padding-right: 80px;">&nbsp;</span>
</div>
</td>
</tr>
</table>
</div>
<!--bookingdetails-->
<div id="single-payment-booking-details" style="width:50%; float:left;">
<table name="bookingDetail" width="100%" style="background-color:#EBEBF1; border-top:#CACACA solid 1px; border-left:#CACACA solid 1px; border-bottom:#CACACA solid 1px; border-right:#CACACA solid 1px; padding-left:10px; padding-right:10px; text-align: left;">
	<tr>
		<td colspan="4" width="100%" style="border-bottom:solid #CACACA 1px;" height="24px">
			<span name="bookingId" style="font-weight:bold;"></span>
		</td>
	</tr> 
	<tr displaytype="group">
		<td style="width:15%;">
			<span style="font-weight:bold;"><%out.print(resource.getString("Payment.bookingdetails.agency"));%> : </span>
		</td>
		<td>
			<span style="color:#103083; font-weight:bold;" name="company">-</span>
		</td>
	</tr>
	<tr displaytype="group">
		<td >
			<spanstyle="font-weight:bold;"><% out.print(resource.getString("Payment.bookingdetails.groupowner"));%> : </span>
		</td>
		<td >
			<span style="color:#103083;font-weight:bold;" name="owner">-</span>
			<span style="color:#A8A8A8">
				<%out.print(resource.getString("Payment.bookingdetails.guestId"));%> :
				<span name="guestId">(-)</span>
				/<%out.print(resource.getString("Payment.bookingdetails.Identificationnumber"));%> :
				<span name="idNumber">(-)</span>
			</span>
		</td>
	</tr>
	<tr displaytype="single">
		<td style="width:15%;">
			<span style="font-weight:bold;"><%out.print(resource.getString("Payment.bookingdetails.guest"));%> : </span>
		</td>
		<td>
			<span style="font-weight:bold;" name="owner">-</span>
		</td>
	</tr>
	<tr>
		<td>
			<span style="font-weight:bold;"><%out.print(resource.getString("Payment.bookingdetails.address"));%> : </span>
		</td>
		<td>
			<span style="font-weight:bold;" name="address">-</span>
		</td>
	</tr>
	<tr>
		<td style="border-bottom:#666 dotted 1px;">
			<span style="font-weight:bold;"><%out.print(resource.getString("Payment.bookingdetails.tel"));%> : </span>
		</td>
		<td style="border-bottom:#666 dotted 1px;">
			<span style="font-weight:bold;" name="tel">-</span>
		</td>
	</tr>
	<tr>
		<td colspan="4">
		<table width="100%">
			<tr>
				<td style="width:15%; font-weight:bold; text-align: justify"><%out.print(resource.getString("Payment.bookingdetails.built"));%></td>
				<td style="width:40%; font-weight:bold;"><%out.print(resource.getString("Payment.bookingdetails.checkIndetail"));%></td>
				<td style="width:30%; font-weight:bold;"><%out.print(resource.getString("Payment.bookingdetails.amountroomandguest"));%></td>
				<td style="width:15%; font-weight:bold;"><%out.print(resource.getString("Payment.bookingdetails.balance"));%></td>
			</tr>
			<tr style="vertical-align:top;">
				<td style="text-align: justify"><span name="buildDate"></span></td>
				<td><div name="roomtype"></div>
					<div name="checkInDate">-</div>
					<div name="pricerate" style="color:#A8A8A8;">-</div>
				</td>
				<td>
					<%out.print(resource.getString("Payment.bookingdetails.room"));%><span span="roomamount">-</span> / 
					<%out.print(resource.getString("Payment.bookingdetails.adult"));%><span name="adult">-</span>
					,<%out.print(resource.getString("Payment.bookingdetails.children"));%><span name="child">-</span>
				</td>
				<td><span name="pricebalance">-</span></td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</div>
<!--Folio -->
<div id="payment-singlefolio-list" style="width:50%; float:left;">
<table width="100%" style="background-color:#EBEBF1; border-top:#CACACA solid 1px; border-left:#CACACA solid 1px; border-bottom:#CACACA solid 1px; border-right:#CACACA solid 1px; text-align: left;">
<tr>
<td width="50%" height="24px" style="padding-left:25px;"><b><%out.print(resource.getString("Payment.folio.folio"));%></b>
</td>
<td width="50%" colspan="2">&nbsp;
</td>
</tr>
<tr style="background-color:#999; width:100;" >
<td colspan="3" >
<table width="100%" style="color:#FFF;" >
<tr id ="payment-singlefolio-title">
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr id="lender-singlefolio-list">
<td style="display:none;">&nbsp;
</td>
</tr>
<tr id="payment-singlefolio-list-footer" style="display:none;">
<td width="50%">
<span><input type="button" id="payment-singlefolio-btn-deletefolio" value="<%out.print(resource.getString("Payment.folio.btn.delfolio"));%>"
onclick="DeleteFolio()"></span>
<span><input type="button" id="payment-singlefolio-btn-email" value="<%out.print(resource.getString("Payment.folio.btn.email"));%>"></span>
<span style="padding-left:100px;"><%out.print(resource.getString("Payment.folio.total"));%></span>
</td>
<td width="22%">
<div style="float:right;"><span id="payment-singlefolio-moneyunit">(฿)</span>&nbsp;<span id="payment-singlefolio-btn-total-amount" style="padding-right:9px;">0</span></div>
</td>
<td width="22%">
<span id="payment-singlefolio-total-paid" style="padding-left:10px">-</span>
<span id="payment-singlefolio-total-balance" style="padding-right:10px; float:right;">-</span>
</td>
</tr>
<tr id="payment-no-singlefolio-list">
<td width="100%" align="center">
<div style="color:#999;">
<% out.print(resource.getString("Payment.foliolist.titleone"));%><a href="javascript:void(0);" onclick="GenarateFolio()" style="padding-right:10px;"><% out.print(resource.getString("Payment.foliolist.titletwo"));%></a>
<div style="font-style:italic;"><% out.print(resource.getString("Payment.foliolist.titlethree"));%></div>
</div>
</td>
</tr>
</table>
<div style="float:right;"><a href="javascript void=0;" ><% out.print(resource.getString("Payment.folio.payterm"));%></a></div>
</div>
</div>
<!------------------------------------Account Statement----------------------------------------------->
<div id="payment-account-statement">
<table width="100%">
<tr>
<td align="center">
<strong><%out.print(resource.getString("Payment.accountstatement.accountstatement"));%></strong>
</td>
</tr>
</table>
<table width="100%" style="padding-left:10px; padding-right:10px;" id="accList" name="accList">
<tr >
<td width="7%" class="createline"><input type="checkbox" id="payment-account-master" onclick="checkAll()">&nbsp;&nbsp;&nbsp;
<%out.print(resource.getString("Payment.accountstatement.date"));%>
</td>
<td align="center" width="38%" class="createline">
<%out.print(resource.getString("Payment.accountstatement.desrefer"));%>
</td>
<td align="center"  width="5%" class="createline">
<span><%out.print(resource.getString("Payment.accountstatement.folio"));%></span>
</td>
<td align="center" width="10%" class="createline">
<%out.print(resource.getString("Payment.accountstatement.discallw"));%>
<td align="center" width="10%" class="createline">
<%out.print(resource.getString("Payment.accountstatement.cost"));%>
</td>
<tdalign="center" width="8%" class="createline">
<%out.print(resource.getString("Payment.accountstatement.tax"));%>
</td>
<td align="center" width="10%" class="createline">
<%out.print(resource.getString("Payment.accountstatement.currency"));%>
</td>
<td align="center"  width="12%" class="createline">
<%out.print(resource.getString("Payment.accountstatement.payment"));%>
</td>
</tr>
<tr id="paymentListGroupSingle">
</tr>
<tr id="chargeListGroupSingle">
</tr>
<tr class="DeteailchargeListSingle" style="background-color:#CCC">
</tr>
<tr class="chargeListSingle">
</tr>
<tr style="background-color:#DDD">
<td colspan="4">
<span id="payment-account-date" style="padding-left:200px"><%out.print(resource.getString("Payment.accountstatement.total"));%>
</span>
</td>
<td>
<span id="singlepayment-account-cost" style="float:right;">&nbsp;</span>
</td>
<td>
<span id="singlepayment-account-tax" style="float:right;">&nbsp;</span>
</td>
<td>
<span id="singlepayment-account-currency" style="float:right;">&nbsp;</span>
</td>
<td>
<span id="singlepayment-account-payment" style="float:right;">&nbsp;</span>
</td>
</tr>
</table>
</div>
<div name="payment_footer">
	<table width="100%">
		<tr>
		<!-- FOOTER TOP LEFT START-->
		<td valign="top" align="left">
			<div style="border:0px solid;" name="payment_footer_top_left">
				<div name="payment_footer_btn" id="payment_single_ingroup_footer_btn">
					<div id="paymentgroup_singlepayment_footer_btn">   <button  name="btn_addtasks_note" style="background-color:#6464F7; width:100px;" onclick="ExceptTex()"><span style="color:#FFF;"><%out.print(resource.getString("Payment.footer.footer_left.tax-exempt"));%></span></button>
					<button  name="btn_route_charges" style="background-color:#6464F7; width:150px;" onclick="ShowRouteChargedialog()"><span style="color:#FFF;"><%out.print(resource.getString("Payment.footer.footer_left.routeCharges"));%></span></button>
					<button  name="btn_addtasks_note" style="background-color:#6464F7; width:100px;" onclick="CreateRefundDialog()"><span style="color:#FFF;" ><%out.print(resource.getString("Payment.footer.footer_left.refund"));%></span></button>
					<button  name="btn_route_payment" style="background-color:#6464F7; width:150px;" onclick="ShowRoutedialog()"><span style="color:#FFF;" ><%out.print(resource.getString("Payment.footer.footer_left.routePayment"));%></span></button>
					<button  name="btn_route_new_folio" style="background-color:#6464F7; width:150px;" onclick="ShowRoutenewFoliodialog()"><span style="color:#FFF;"><%out.print(resource.getString("Payment.footer.footer_bottom.routenewfolio"));%></span></button>
</div>
				<div id="foliogroup_singlepayment_footer_btn">
				<table style="margin-top:20px; border:1px dashed; border-color:#804DE6; background-color:#F1F1F1;" width="80%">
						<tr>
							<td>
								<button name="btn_create_folio" style="background-color:#F3F3F3; width:100px;"><span style="color:#000;" onclick="GenarateFolio()"><%out.print(resource.getString("Payment.footer.footer_left.createFolio"));%></span></button>
								<button name="btn_create_charges" style="background-color:#F3F3F3; width:150px;" onclick="CreateChargesdiaLog(id)" id="btn_create_charges"><span style="color:#000;"><%out.print(resource.getString("Payment.footer.footer_left.paymentCharge"));%></span></button>
								<button name="btn_create_custom_charges" style="background-color:#F3F3F3; width:160px;" onclick="CreateChargesdiaLog(id)" id="btn_create_custom_charges"><span style="color:#000;"><%out.print(resource.getString("Payment.footer.footer_left.paymentChargeCustom")); %></span></button>
							</td>
						</tr>
					</table>
					</div>
					<div id="innerfoliogroup_singlepayment_footer_btn" style="display:none;">
				<table style="margin-top:20px; border:1px dashed; border-color:#804DE6; background-color:#F1F1F1;" width="80%">
						<tr>
							<td width="60%">
								<button  name="btn_back_to_accounts" style="background-color:#F3F3F3; width:200px;" onclick="BacktoAccountStatement()">
								<span style="color:#000;"><%out.print(resource.getString("Payment.btn.backAcc"));%></span></button>
								<button  name="btn_back_to_accounts_group" style="background-color:#F3F3F3; width:200px; display:none;" onclick="BacktoAccountStatementGroup()">
								<span style="color:#000;"><%out.print(resource.getString("Payment.btn.backAcc"));%></span></button>
								</td>
								<td width="40%">
								<button  name="btn_summary_folio" style="background-color:#F3F3F3; width:150px;" onclick="OpenFolioSummaryPage()" id="btn_create_charges"><span style="color:#000;"><%out.print(resource.getString("Payment.btn.summaryFolio"));%></span></button>
							</td>
						</tr>
					</table>
					</div>
					<div id="back_to_folio_btn" style="display:none;">
					<table style="margin-top:20px; border:1px dashed; border-color:#804DE6; background-color:#F1F1F1;" width="80%">
						<tr>
							<td width="60%">
								<button  name="btn_back_to_folio" style="background-color:#F3F3F3; width:200px;" onclick="BacktoFolioPage()"><span style="color:#000;"><%out.print(resource.getString("Payment.btn.backFolio"));%></span>
								</button>
								</td>
								<td width="40%">&nbsp;</td>
						</tr>
					</table>
					</div>
				</div>
			</div>
		</td>
		<!-- FOOTER TOP LEFT END-->
		<!-- FOOTER TOP RIGHT START-->
		<td>
		<div style="border:0px solid;" name="payment_footer_top_right">
				<table style="border-bottom:1px dashed;margin-left:30%;" width="70%">
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><%out.print(resource.getString("Payment.footer.footer_right.totalReservation"));%></B>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="roomCharge">0</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<%out.print(resource.getString("Payment.footer.footer_right.chargesOther"));%>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="otherCharge">0</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<%out.print(resource.getString("Payment.footer.footer_right.totalTax"));%>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="taxCharge">0</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<%out.print(resource.getString("Payment.footer.footer_right.totalDiscAllw"));%>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="disCount">0</span>
						</td>
					</tr>
				</table>
				<table style="border-bottom:1px dashed;margin-left:30%;" width="70%">
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><%out.print(resource.getString("Payment.footer.footer_right.totalSumTax"));%></B>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="totalTaxCharge">0</span>
						</td>
					</tr>
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><%out.print(resource.getString("Payment.footer.footer_right.totalPayment"));%></B>
						</td>
						<td>
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="totalPay">0</span>
						</td>
					</tr>
				</table>
				<table style="border-bottom:1px dashed;margin-left:30%;" width="70%">
					<tr>
						<td style="text-align:right;" width="33.33%">
						<B><%out.print(resource.getString("Payment.footer.footer_right.totalBalance"));%></B>
						</td>
						<td style="text-align:right;" >
						</td>
						<td style="text-align:right;" width="33.33%">
						<span id="totalBalance">0</span>
						</td>
					</tr>
				</table>
			</div>
		</td>
		<!-- FOOTER TOP RIGHT END-->
		</tr>
	</table>
	<table width="100%">
		<tr>
		<!-- FOOTER CENTER START -->
			<td>
			<div style="border:1px solid; background-color:#F1F1F1" name="payment_footer_center">
				<center>
					<table style="border-bottom:1px solid; border-color:#804DE6;" width="97%">
						<tr>
							<td width="10%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.payment"));%></B>
							</td>
							<td style="color:red;">
								Payment Gateway is not integrated. Credit card will not be charged.
							</td>
						</tr>
					</table>
				</center>
				<center>
					<table  width="95%">
						<tr>
							<td width="15%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.mode"));%></B>
							</td>
							<td width="15%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.type"));%></B>
							</td>
							<td width="10%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.amount"));%></B>
							</td>
							<td width="20%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.code"));%></B>
							</td>
							<td width="10%">
								<B><%out.print(resource.getString("Payment.footer.footer_center.number"));%></B>
							</td>
							<td width="30%" colspan=2>
								<B><%out.print(resource.getString("Payment.footer.footer_center.description"));%></B>
							</td>
						</tr>
						<tr>
							<td width="15%">
							<select name="paymode" onchange="fillPayPaymentType()"></select>
							</td>
							<td width="15%">
							<select name="paytype">
							</select>
							</td>
							<td  width="10%">
								<input id="payamountS" name="payamount" type="text" value="฿ 00.00" onchange="chkNum(this)" style="text-align:right;">
							</td>
							<td width="20%">
								<input id="payCcNoS" name="payCcNo" type="text" size="30" onkeyup="suggestOnPage(this,this.value);" onblur="checkValue();">
                                <select id="payCcNoS" name="payCcNo" style="display:none;" onchange="checkToAddCreditCard()"></select>
                                <div name="showdialogAddcreditCard"></div>
							</td>
							<td  width="10%">
								<input id="payCcNo2S" name="payCcNo2" type="text" value="" style="text-align:right;">
							</td>
							<td width="15%">
								<input id="payDesS" name="payDes" type="text" size="30">
							</td>
							<td width="15%">
							<button id="btnAddPaymentS" name="btnAddPayment" style="background-color:#6464F7; width:80px;" onclick="addPayment(id)"><span style="color:#FFF;"><%out.print(resource.getString("Payment.footer.footer_center.pay"));%></span></button>
							</td>
						</tr>
					</table>
				</center>
			</div>
			</td>
		<!-- FOOTER CENTER END -->
		</tr>
	</table>
	<table style="background-color:#BEBEBE;" width="100%">
		<tr>
			<td style="text-align:center;">
	<jsp:include page="paymentButton.jsp" flush="true"/>
				</td>
		</tr>
	</table>
</div>
</div>
<jsp:include page="../Payment/Charges.jsp" flush="true"/>
<jsp:include page="../Payment/Refund.jsp" flush="true"/>
<jsp:include page="../Payment/CreateCreditCard.jsp" flush="true"/>
<jsp:include page="RoutePayment.jsp" flush="true"/>
